unit valorGlobal;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, StdCtrls, Buttons, LMDCustomControl, LMDCustomPanel,
  LMDCustomBevelPanel, LMDBaseEdit, LMDCustomEdit, LMDCustomMaskEdit,
  LMDCalculatorEdit, ExtCtrls;

type
  TfrmValorGlobal = class(TForm)
    Panel1: TPanel;
    edtValor: TLMDCalculatorEdit;
    Label1: TLabel;
    BitBtn2: TBitBtn;
    BitBtn1: TBitBtn;
  private
    function RecuperarValor : Double;
    procedure EstablecerValor (valor : Double);
  public
    property Valor: Double read RecuperarValor write EstablecerValor;
    function Entrar : Double;
  end;

var
  frmValorGlobal: TfrmValorGlobal;

implementation

uses MDatos;

{$R *.dfm}

function TfrmValorGlobal.RecuperarValor : Double;
begin
  Result := edtValor.AsCurrency;
end;

procedure TfrmValorGlobal.EstablecerValor (valor : Double);
begin
  edtValor.SetValue(valor);
end;

function TfrmValorGlobal.Entrar : Double;
begin
  Result := ShowModal;
end;

end.
